Systems and Methods for Integrating Third Party Services with a Digital Assistant

ABSTRACT

The electronic device with one or more processors and memory receives an input of a user. The electronic device, in accordance with the input, identifies a respective task type from a plurality of predefined task types associated with a plurality of third party service providers. The respective task type is associated with at least one third party service provider for which the user is authorized and at least one third party service provider for which the user is not authorized. In response to identifying the respective task type, the electronic device sends a request to perform at least a portion of a task to a third party service provider of the plurality of third party service providers that is associated with the respective task type.

RELATED APPLICATIONS

This application claims priority to U.S. Provisional Patent Application Ser. No. 61/799,916, filed Mar. 15, 2013, entitled “Systems and Methods for Integrating Third Party Services with a Digital Assistant” and U.S. Provisional Patent Application Ser. No. 61/647,434, filed May 15, 2012, entitled “Systems and Methods for Integrating Third Party Services with a Digital Assistant.” Both of these applications are incorporated by reference herein in their entirety.

TECHNICAL FIELD

The disclosed embodiments relate generally to digital assistant systems, and more specifically, third party computer systems and services integrated with a digital assistant system.

BACKGROUND

Just like human personal assistants, digital assistant systems can perform requested tasks and provide requested advice, information, or services. A digital assistant system's ability to fulfill a user's request is dependent on the digital assistant system's correct comprehension of the request or instructions. Recent advances in natural language processing have enabled users to interact with digital assistant systems using natural language, in spoken or textual forms. Such digital assistant systems can interpret the user's input to deduce the user's intent, translate the deduced intent into actionable tasks and parameters, execute operations or deploy services to perform the tasks, and produce output that is intelligible to the user. Ideally, the output produced by a digital assistant system should fulfill the user's intent expressed during the natural language interaction between the user and the digital assistant system.

The ability of a digital assistant system to produce satisfactory responses to user requests depends on the natural language processing, knowledge base, and artificial intelligence available to the digital assistant system. Moreover, while numerous third party systems and services currently exist, there is no efficient means for a digital assistant system to integrate efficiently with such third party computer systems and services.

SUMMARY

As described above, there is a need for digital assistant systems to integrate with third party computer systems and services that have access to databases otherwise not available to the digital assistant systems. This enables the digital assistant systems to perform tasks that the digital assistant systems cannot otherwise perform.

The embodiments disclosed herein provide methods, systems, and computer readable storage media that integrate a digital assistant system with one or more third party service provider systems to generate a response to a user request based on information or assistance obtained from at least one of the one or more third party service provider systems.

Some embodiments provide a method for processing a user input performed at an electronic device with one or more processors and memory. This method includes receiving a first set of one or more predefined task types from a service provider, and integrating the first set of one or more predefined task types with a second set of predefined task types not associated with the service provider to generate a plurality of predefined tasks. The method also includes receiving an input of a user, and, in accordance with the input, identifying a respective task type from the plurality of predefined task types. The respective task type corresponds to one of the first set of one or more predefined task types. The method further includes, in response to identifying the respective task type, sending to the service provider a request to perform at least a portion of a task associated with the input.

In some embodiments, a method for processing a user input, performed at an electronic device with one or more processors and memory, includes receiving an input of a user, and, in accordance with the input, identifying a respective task type from a plurality of predefined task types associated with a plurality of third party service providers. The respective task type is associated with at least one third party service provider for which the user is authorized and at least one third party service provider for which the user is not authorized. The method also includes, in response to identifying the respective task type, sending a request to perform at least a portion of a task to a third party service provider of the plurality of third party service providers that is associated with the respective task type.

In some embodiments, a method for processing a user input, performed at an electronic device with one or more processors and memory, includes receiving an input of a user, and, in accordance with the input, identifying a respective task type from a plurality of predefined task types. The method also includes, in response to identifying the respective task type, locating one or more service providers. Each located service provider is associated with an identification of one or more supported task types (also called herein “competencies”), and the one or more supported task types for the service provider include the respective task type. The method further includes, after locating the one or more service providers, sending a request to perform at least a portion of a task to a service provider of the one or more service providers.

In some embodiments, a method for processing a user input, performed at a server system with one or more processors and memory, includes identifying a location of a portable electronic device associated with a user, identifying a respective domain corresponding, to the location of the portable electronic device associated with the user, receiving an input of the user, and, in accordance with the input, identifying a respective task type corresponding to the respective domain. The method also includes, in response to identifying the respective task type, sending a request, associated with the input, to perform at least a portion of a task to a respective service provider associated with the respective domain.

In some embodiments, the input is a voice input of the user.

In accordance with some embodiments, an electronic device includes one or more processors and memory storing one or more programs for execution by the one or more processors. The one or more programs include instructions for performing the operations of any of the methods described above. In accordance with some embodiments, a graphical user interface on an electronic device with a display, memory, and one or more processors to execute one or more programs stored in the memory includes one or more of the elements displayed in any of the methods described above, which are updated in response to inputs, as described in any of the methods above. In accordance with some embodiments, a computer readable storage medium has stored therein instructions, which, when executed by an electronic device with one or more processors and memory, cause the device to perform the operations of any of the methods described above. In accordance with some embodiments, an electronic device includes means for performing the operations of any of the methods described above. In accordance with some embodiments, an information processing apparatus, for use in an electronic device includes means for performing the operations of any of the methods described above. In accordance with some embodiments, an electronic device includes a processing unit configured to perform the operations of any of the methods described above.

Thus, digital assistant systems are provided with new and improved methods that integrate third party service providers, thereby improving and expanding the capabilities of the digital assistant systems. Such methods and systems may complement or replace existing methods and systems.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating an environment in which a digital assistant operates in accordance with some embodiments.

FIG. 2 is a block diagram illustrating a digital assistant client system in accordance with some embodiments.

FIG. 3A is a block diagram illustrating a standalone digital assistant system or a digital assistant server system in accordance with some embodiments.

FIG. 3B is a block diagram illustrating functions of the digital assistant shown in FIG. 3A in accordance with some embodiments.

FIG. 3C is a network diagram illustrating a portion of an ontology in accordance with some embodiments.

FIGS. 4A-4B are flow charts illustrating, operations performed by a client system, a server system, and a service provider system in accordance with some embodiments.

Like reference numerals refer to corresponding parts throughout the drawings.

DESCRIPTION OF EMBODIMENTS

FIG. 1 is a block diagram of an operating environment 100 of a digital assistant according to some embodiments. The terms “digital assistant,” “virtual assistant,” “intelligent automated assistant,” or “automatic digital assistant,” refer to any information processing system that interprets natural language input in spoken and/or textual form to deduce user intent (e.g., identify a task type that corresponds to the natural language input), and performs actions based on the deduced user intent (e.g., perform a task corresponding to the identified task type). For example, to act on a deduced user intent, the system can perform one or more of the following: identifying a task flow with steps and parameters designed to accomplish the deduced user intent (e.g., identifying a task type), inputting specific requirements from the deduced user intent into the task flow, executing the task flow by invoking programs, methods, services, APIs, or the like (e.g., sending a request to a service provider): and generating output responses to the user in an audible (e.g., speech) and/or visual form.

Specifically, a digital assistant system is capable of accepting a user request at least partially in the form of a natural language command, request, statement, narrative, and/or inquiry. Typically, the user request seeks either an informational answer or performance of a task by the digital assistant system. A satisfactory response to the user request is generally either provision of the requested informational answer, performance of the requested task, or a combination of the two. For example, a user may ask the digital assistant system a question, such as “Where am I right now?” Based on the user's current location, the digital assistant may answer, “You are in Central Park near the west gate.” The user may also request the performance of a task, for example, by stating “Please invite my friends to my girlfriend's birthday party next week.” In response, the digital assistant may acknowledge the request by generating a voice output, “Yes, right away,” and then send a suitable calendar invite from the user's email address to each of the user' friends listed in the user's electronic address book. There are numerous other ways of interacting with a digital assistant to request information or performance of various tasks. In addition to providing verbal responses and taking programmed actions, the digital assistant can also provide responses in other visual or audio forms (e.g., as text, alerts, music, videos, animations, etc.).

As shown in FIG. 1 , in some embodiments, a digital assistant system is implemented according to a client-server model. The digital assistant system includes a client-side portion (e.g., 102 a and 102 b) (hereafter “digital assistant (DA) client 102”) executed on a user device (e.g., 104 a and 104 b), and a server-side portion 106 (hereafter “digital assistant (DA) server 106”) executed on a server system 108. The DA client 102 communicates with the DA server 106 through one or more networks 110. The DA client 102 provides client-side functionalities such as user-facing input and output processing and communications with the DA server 106. The DA server 106 provides server-side functionalities for any number of DA clients 102 each residing on a respective user device 104 (also called a client device).

In some embodiments, the DA server 106 includes a client-facing I/O interface 112, one or more processing modules 114, data and models 116, and an I/O interface to external services 118. The client-facing I/O interface facilitates the client-facing input and output processing for the digital assistant server 106. The one or more processing modules 114 utilize the data and models 116 to determine the user's intent based on natural language input and perform task execution based on the deduced user intent.

In some embodiments, the DA server 106 communicates with external services 120 (e.g., navigation service(s) 122-1, messaging service(s) 122-2, information service(s) 122-3, calendar service 122-4, telephony service 122-5, etc.) through the network(s) 110 for task completion or information acquisition. The I/O interface to the external services 118 facilitates such communications.

Examples of the user device 104 include, but are not limited to, a handheld computer, a personal digital assistant (PDA), a tablet computer, a laptop computer, a desktop computer, a cellular telephone, a smartphone, an enhanced general packet radio service (EGPRS) mobile phone, a media player, a navigation device, a game console, a television, a remote control, or a combination of any two or more of these data processing devices or any other suitable data processing devices. More details on the user device 104 are provided in reference to an exemplary user device 104 shown in FIG. 2 .

Examples of the communication network(s) 110 include local area networks (“LAN”) and wide area networks (“WAN”), e.g., the Internet. The communication network(s) 110 may be implemented using any known network protocol, including various wired or wireless protocols, such as Ethernet, Universal Serial Bus (USB), FIREWIRE, Global System for Mobile Communications (GSM), Enhanced Data GSM Environment (EDGE), code division multiple access (CDMA), time division multiple access (TDMA), Bluetooth, Wi-Fi, voice over Internet Protocol (Vol P), Wi-MAX, or any other suitable communication protocol.

The server system 108 can be implemented on at least one data processing apparatus and/or a distributed network of computers. In some embodiments, the server system 108 also employs various virtual devices and/or services of third party service providers (e.g., third-party cloud service providers) to provide the underlying computing resources and/or infrastructure resources of the server system 108.

Although the digital assistant system shown in FIG. 1 includes both a client-side portion (e.g., the DA client 102) and a server-side portion (e.g., the DA server 106), in some embodiments, a digital assistant system refers only to the server-side portion (e.g., the DA server 106). In some embodiments, the functions of a digital assistant can be implemented as a standalone application installed on a user device. In addition, the divisions of functionalities between the client and server portions of the digital assistant can vary in different embodiments. For example, in some embodiments, the DA client 102 is a thin-client that provides only user-facing input and output processing functions, and delegates all other functionalities of the digital assistant to the DA server 106. In some other embodiments, the DA client 102 is configured to perform or assist one or more functions of the DA server 106.

FIG. 2 is a block diagram of a user device 104 in accordance with some embodiments. The user device 104 includes a memory interface 202, one or more processors 204, and a peripherals interface 206. The various components in the user device 104 are coupled by one or more communication buses or signal lines. The user device 104 includes various sensors, subsystems, and peripheral devices that are coupled to the peripherals interface 206. The sensors, subsystems, and peripheral devices gather information and/or facilitate various functionalities of the user device 104.

For example, in some embodiments, a motion sensor 210, a light sensor 212, and a proximity sensor 214 are coupled to the peripherals interface 206 to facilitate orientation, light, and proximity sensing functions. In some embodiments, other sensors 216, such as a positioning system (e.g., UPS receiver), a temperature sensor, a biometric sensor, and the like, are connected to the peripherals interface 206, to facilitate related functionalities.

In some embodiments, the user device 104 includes a camera subsystem 220 coupled to the peripherals interface 206. In some embodiments, an optical sensor 222 of the camera subsystem 220 facilitates camera functions, such as taking photographs and recording video clips. In some embodiments, the user device 104 includes one or more wired and/or wireless communication subsystems 224 provide communication functions. The communication subsystems 224 typically includes various communication ports, radio frequency receivers and transmitters, and/or optical (e.g., infrared) receivers and transmitters. In some embodiments, the user device 104 includes an audio subsystem 226 coupled to one or more speakers 228 and one or more microphones 230 to facilitate voice-enabled functions, such as voice recognition, voice replication, digital recording, and telephony functions.

In some embodiments, an I/O subsystem 240 is also coupled to the peripheral interface 206, in some embodiments, the user device 104 includes a touch screen 246, and the I/O subsystem 240 includes a touch screen controller 242 coupled to the touch screen 246. When the user device 104 includes the touch screen 246 and the touch screen controller 242, the touch screen 246 and the touch screen controller 242 are typically configured to, for example, detect contact and movement or break thereof using any of a plurality of touch sensitivity technologies, such as capacitive, resistive, infrared, surface acoustic wave technologies, proximity sensor arrays, and the like. In some embodiments, the user device 104 includes a display that does not include a touch-sensitive surface. In some embodiments, the user device 104 includes a separate touch-sensitive surface. In some embodiments, the user device 104 includes other input controller(s) 244. When the user device 104 includes the other input controller(s) 244, the other input controller(s) 244 are typically coupled to other input/control devices 248, such as one or more buttons, rocker switches, thumb-wheel, infrared port, USB port, and/or a pointer device such as a stylus.

The memory interface 202 is coupled to memory 250. In some embodiments, the memory 250 includes a non-transitory computer readable medium, such as high-speed random access memory and/or non-volatile memory (e.g., one or more magnetic disk storage devices, one or more flash memory devices, one or more optical storage devices, and/or other non-volatile solid-state memory devices).

In some embodiments, the memory 250 stores an operating system 252, a communications module 254, a graphical user interface module 256, a sensor processing module 258, a phone module 260, and applications 262, and a subset or superset thereof. The operating system 252 includes instructions for handling basic system services and for performing hardware dependent tasks. The communications module 254 facilitates communicating with one or more additional devices, one or more computers and/or one or more servers. The graphical user interface module 256 facilitates graphic user interface processing. The sensor processing module 258 facilitates sensor-related processing and functions (e.g., processing voice input received with the one or more microphones 228). The phone module 260 facilitates phone-related processes and functions. The application module 262 facilitates various functionalities of user applications, such as electronic-messaging, web browsing, media processing, navigation, imaging and/or other processes and functions. In some embodiments, the user device 104 stores in the memory 250 one or more software applications 270-1 and 270-2 each associated with at least one of the external service providers.

As described above, in some embodiments, the memory 250 also stores client-side digital assistant instructions (e.g., in a digital assistant client module 264) and various user data 266 (e.g., user-specific vocabulary data, preference data, and/or other data such as the user's electronic address book, to-do lists, shopping lists, etc.) to provide the client-side functionalities of the digital assistant.

In various embodiments, the digital assistant client module 264 is capable of accepting voice input, text input, touch input, and/or gestural input through various user interfaces (e.g., the I/O subsystem 244) of the user device 104. The digital assistant client module 264 is also capable of providing output in audio, visual, and/or tactile forms. For example, output can be provided as voice, sound, alerts, text messages, menus, graphics, videos, animations, vibrations, and/or combinations of two or more of the above. During operation, the digital assistant client module 264 communicates with the digital assistant server (e.g., the digital assistant server 106, FIG. 1 ) using the communication subsystems 224.

In some embodiments, the digital assistant client module 264 utilizes various sensors, subsystems and peripheral devices to gather additional information from the surrounding environment of the user device 104 to establish a context associated with a user input. In some embodiments, the digital assistant client module 264 provides the context information or a subset thereof with the user input to the digital assistant server (e.g., the digital assistant server 106, FIG. 1 ) to help deduce the user's intent.

In some embodiments, the context information that can accompany the user input includes sensor information, e.g., lighting, ambient noise, ambient temperature, images or videos of the surrounding environment, etc. In some embodiments, the context information also includes the physical state of the device. e.g., device orientation, device location, device temperature, power level, speed, acceleration, motion patterns, cellular signals strength, etc. In some embodiments, information related to the software state of the user device 106, e.g., running processes, installed programs, past and present network activities, background services, error logs, resources usage, etc., of the user device 104 is also provided to the digital assistant server (e.g., the digital assistant server 106, FIG. 1 ) as context information associated with a user input.

In some embodiments, the DA client module 264 selectively provides information (e.g., at least a portion of the user data 266) stored on the user device 104 in response to requests from the digital assistant server. In some embodiments, the digital assistant client module 264 also elicits additional input from the user via a natural language dialogue or other user interfaces upon request by the digital assistant server 106 (FIG. 1 ). The digital assistant client module 264 passes the additional input to the digital assistant server 106 to help the digital assistant server 106 in intent deduction and/or fulfillment of the user's intent expressed in the user request.

In some embodiments, the memory 250 may include additional instructions or fewer instructions. Furthermore, various functions of the user device 104 may be implemented in hardware and/or in firmware, including in one or more signal processing and/or application specific integrated circuits, and the user device 104, thus, need not include all modules and applications illustrated in FIG. 2 .

FIG. 3A is a block diagram of an exemplary digital assistant system 300 in accordance with some embodiments. In some embodiments, the digital assistant system 300 is implemented on a standalone computer system. In some embodiments, the digital assistant system 300 is distributed across multiple computers. In some embodiments, some of the modules and functions of the digital assistant are divided into a server portion and a client portion, where the client portion resides on a user device (e.g., the user device 104) and communicates with the server portion (e.g., the server system 108) through one or more networks, e.g., as shown in FIG. 1 . In some embodiments, the digital assistant system 300 is an embodiment of the server system 108 (and/or the digital assistant server 106) shown in FIG. 1 . In some embodiments, the digital assistant system 300 is implemented in a user device (e.g., the user device 104, FIG. 1 ), thereby eliminating the need for a client-server system. It should be noted that the digital assistant system 300 is only one example of a digital assistant system, and that the digital assistant system 300 may have more or fewer components than shown, may combine two or more components, or may have a different configuration or arrangement of the components. The various components shown in FIG. 3A may be implemented in hardware, software, firmware, including one or more signal processing and/or application specific integrated circuits, or a combination of thereof.

The digital assistant system 300 includes memory 302, one or more processors 304, an input/output (I/O) interface 306, and a network communications interface 308. These components communicate with one another over one or more communication buses or signal lines 310.

In some embodiments, the memory 302 includes a non-transitory computer readable medium, such as high-speed random access memory and/or a non-volatile computer readable storage medium (e.g., one or more magnetic disk storage devices, one or more flash memory devices, one or more optical storage devices, and/or other non-volatile solid-state memory devices).

The I/O interface 306 couples input/output devices 316 of the digital assistant system 300, such as displays, a keyboards, touch screens, and microphones, to the user interface module 322. The I/O interface 306, in conjunction with the user interface module 322, receives user inputs (e.g., voice input, keyboard inputs, touch inputs, etc.) and process them accordingly. In some embodiments, when the digital assistant is implemented on a standalone user device, the digital assistant system 300 includes any of the components and I/O and communication interfaces described with respect to the user device 104 in FIG. 2 (e.g., one or more microphones 228). In some embodiments, the digital assistant system 300 represents the server portion of a digital assistant implementation, and interacts with the user through a client-side portion residing on a user device (e.g., the user device 104 shown in FIG. 2 ).

In some embodiments, the network communications interface 308 includes wired communication port(s) 312 and/or wireless transmission and reception circuitry 314. The wired communication port(s) receive and send communication signals via one or more wired interfaces, e.g., Ethernet, Universal Serial Bus (USB), FIREWIRE, etc. The wireless circuitry 314 typically receives and sends RE signals and/or optical signals from/to communications networks and other communications devices. The wireless communications may use any of a plurality of communications standards, protocols and technologies, such as GSM. EDGE, (DMA. TDMA, Bluetooth, Wi-Fi, Wi-MAX, or any other suitable communication protocol. The network communications interface 308 enables communication between the digital assistant system 300 with networks, such as the Internet, an intranet and/or a wireless network, such as a cellular telephone network, a wireless local area network (LAN) and/or a metropolitan area network (MAN), and other devices.

In some embodiments, the non-transitory computer readable storage medium of memory 302 stores programs, modules, instructions, and data structures including all or a subset of: an operating system 318, a communications module 320, a user interface module 322, one or more applications 324, and a digital assistant module 326. The one or more processors 304 execute these programs, modules, and instructions, and reads/writes from/to the data structures.

The operating system 318 (e.g., Darwin, RTXC, LINUX, UNIX, OS X. WINDOWS, or an embedded operating system such as VxWorks) includes various software components and/or drivers for controlling and managing general system tasks (e.g., memory management, storage device control, power management, etc.) and facilitates communications between various hardware, firmware, and software components.

The communications module 320 facilitates communications between the digital assistant system 300 with other devices over the network communications interface 308. For example, the communication module 320 may communicate with the communications module 254 of the device 104 shown in FIG. 2 . The communications module 320 also includes various software components for handling data received by the wireless circuitry 314 and/or wired communications port 312.

) In some embodiments, the user interface module 322 receives commands and/or inputs from a user via the I/O interface 306 (e.g., from a keyboard, touch screen, and/or microphone), and provides user interface objects on a display.

The applications 324 include programs and/or modules that are configured to be executed by the one or more processors 304. For example, if the digital assistant system is implemented on a standalone user device, the applications 324 may include user applications, such as games, a calendar application, a navigation application, or an email application. If the digital assistant system 300 is implemented on a server farm, the applications 324 may include resource management applications, diagnostic applications, or scheduling applications, for example.

The memory 302 also stores the digital assistant module (or the server portion of a digital assistant) 326. In some embodiments, the digital assistant module 326 includes the following sub-modules, or a subset or superset thereof: an input/output processing module 328, a speech-to-text (STT) processing module 330, a natural language processing module 332, a dialogue flow processing module 334, a task flow processing module 336, and a service processing module 338. Each of these processing modules has access to one or more of the following data and models of the digital assistant 326, or a subset or superset thereof: ontology 360, vocabulary index 344, user data 348, task flow models 354, and service models 356.

In some embodiments, the ontology 360 includes one or more third party domains 374. In some embodiments, the digital assistant system 300 includes one or more default domains 372.

In some embodiments, the one or more default domains 372 include one or more private domains. In some embodiments, the one or more third party domains 374 include one or more public domains. In some embodiments, the one or more third party domains 374 include one or more developer domains.

In some embodiments, the vocabulary 344 includes one or more third party vocabularies 378. In some embodiments, the vocabulary 344 includes one or more default vocabularies 376.

In some embodiments, the task flow models 354 include one or more third party task flow models 382. In some embodiments, the task flow models 354 include one or more default task flow models 380.

In some embodiments, the service models 356 include one or more third party service models 386. In some embodiments, the service models 356 include one or more default service models 384.

In some embodiments, the memory 302 also stores a service provider directory 390. In some embodiments, the service provider directory 390 includes a list of supported tasks or competencies 392 for respective third party service provider systems.

In some embodiments, using the processing modules (e.g., the input/output processing module 328, the STT processing module 330, the natural language processing module 332, the dialogue flow processing module 334, the task flow processing module 336, and/or the service processing module 338), data, and models implemented in the digital assistant module 326, the digital assistant system 300 performs at least some of the following: identifying a user's intent expressed in a natural language input received from the user; actively eliciting and obtaining information needed to fully deduce the user's intent (e.g., by disambiguating words, names, intentions, etc.); determining the task flow for fulfilling the deduced intent; and executing the task flow to fulfill the deduced intent. In some embodiments, the digital assistant also takes appropriate actions when a satisfactory response was not or could not be provided to the user for various reasons.

In some embodiments, the memory 302 also includes a user application data 340, which identifies one or more software applications a respective user is authorized to use. In some embodiments, the user application data 340 also includes the frequency and recency (i.e., indication of how recently the one or more software applications were used) of use of the one or more software applications. In some embodiments, the user application data 340 is included in the user data 348.

In some embodiments, a server of a third party service provider (e.g., external services 120 in FIG. 1 ) also includes components shown in FIG. 3A ontology 360, task flow models 354, etc.).

As shown in FIG. 3B, in some embodiments, the I/O processing module 328 interacts with the user through the I/O devices 316 in FIG. 3A or with a user device (e.g., a user device 104 in FIG. 1 ) through the network communications interface 308 in FIG. 3A to obtain user input (e.g., a speech input) and to provide responses to the user input. The I/O processing module 328 optionally obtains context information associated with the user input from the user device, along with or shortly after the receipt of the user input. The context information includes user-specific data, vocabulary, and/or preferences relevant to the user input. In some embodiments, the context information also includes software and hardware states of the device (e.g., the user device 104 in FIG. 1 ) at the time the user request is received, and/or information related to the surrounding environment of the user at the time that the user request was received. In some embodiments, the I/O processing module 328 also sends follow-up questions to, and receives answers from, the user regarding the user request. In some embodiments, when a user request is received by the I/O processing module 328 and the user request contains a speech input, the I/O processing module 328 forwards the speech input to the speech-to-text (STT) processing module 330 for speech-to-text conversions.

In some embodiments, the speech-to-text processing module 330 receives speech input (e.g., a user utterance captured in a voice recording) through the I/O processing module 328. In some embodiments, the speech-to-text processing module 330 uses various acoustic and language models to recognize the speech input as a sequence of phonemes, and ultimately, a sequence of words or tokens written in one or more languages. The speech-to-text processing module 330 is implemented using any suitable speech recognition techniques, acoustic models, and language models, such as Hidden Markov Models, Dynamic Time Warping (DTW)-based speech recognition, and other statistical and/or analytical techniques. In some embodiments, the speech-to-text processing can be performed at least partially by a third party service or on the user's device. Once the speech-to-text processing module 330 obtains the result of the speech-to-text processing (e.g., a sequence of words or tokens), it passes the result to the natural language processing module 332 for intent deduction.

The natural language processing module 332 (“natural language processor”) of the digital assistant 326 takes the sequence of words or tokens (“token sequence”) generated by the speech-to-text processing module 330, and attempts to associate the token sequence with one or more “actionable intents” recognized by the digital assistant. As used herein, an “actionable intent” represents a task that can be performed by the digital assistant 326 and/or the digital assistant system 300 (FIG. 3A), and has an associated task flow implemented in the task flow models 354. The associated task flow is a series of programmed actions and steps that the digital assistant system 300 takes in order to perform the task. The scope of a digital assistant system's capabilities is dependent on the number and variety of task flows that have been implemented and stored in the task flow models 354, or in other words, on the number and variety of “actionable intents” that the digital assistant system 300 recognizes. The effectiveness of the digital assistant system 300, however, is also dependent on the digital assistant system's ability to deduce the correct “actionable intent(s)” from the user request expressed in natural language.

In some embodiments, in addition to the sequence of words or tokens obtained from the speech-to-text processing module 330, the natural language processor 332 also receives context information associated with the user request (e.g., from the I/O processing module 328). The natural language processor 332 optionally uses the context information to clarify, supplement, and/or further define the information contained in the token sequence received from the speech-to-text processing module 330. The context information includes, for example, user preferences, hardware and/or software states of the user device, sensor information collected before, during, or shortly after the user request, prior interactions (e.g., dialogue) between the digital assistant and the user, and the like.

In some embodiments, the natural language processing is based on an ontology 360. The ontology 360 is a hierarchical structure containing a plurality of nodes, each node representing either an “actionable intent” or a “property” relevant to one or more of the “actionable intents” or other “properties”. As noted above, an “actionable intent” represents a task that the digital assistant system 300 is capable of performing (e.g., a task that is “actionable” or can be acted on). A “property” represents a parameter associated with an actionable intent or a sub-aspect of another property. A linkage between an actionable intent node and a property node in the ontology 360 defines how a parameter represented by the property node pertains to the task represented by the actionable intent node.

In some embodiments, the ontology 360 is made up of actionable intent nodes and property nodes. Within the ontology 360, each actionable intent node is linked to one or more property nodes either directly or through one or more intermediate property nodes. Similarly, each property node is linked to one or more actionable intent nodes either directly or through one or more intermediate property nodes. For example, the ontology 360 shown in FIG. 3C includes a “restaurant reservation” node, which is an actionable intent node. Property nodes “restaurant,” “date/time” (for the reservation), and “party size” are each directly linked to the “restaurant reservation” node (an actionable intent node). In addition, property nodes “cuisine,” “price range,” “phone number.” and “location” are sub-nodes of the property node “restaurant.” and are each linked to the “restaurant reservation” node through the intermediate property node “restaurant.” For another example, the ontology 360 shown in FIG. 3C also includes a “set reminder” node, which is another actionable intent node. Property nodes “date/time” (for the setting the reminder) and “subject” (for the reminder) are each linked to the “set reminder” node. Since the property node “date/time” is relevant to both the task of making a restaurant reservation and the task of setting a reminder, the property node “date/time” is linked to both the “restaurant reservation node” and the “set reminder” node in the ontology 360. The ontology 360 shown in FIG. 3C further includes a “restaurant review” node, which is an actionable intent node. Property nodes “review” (e.g., user comments), “rating” (e.g., numerical scores), and “restaurant” are each directly linked to the “restaurant review” node. Since the property node “restaurant” is relevant to both the task of making a restaurant reservation and the task of retrieving a restaurant review, the property node “restaurant” is linked to both the “restaurant reservation” node and the “restaurant review” node in the ontology 360.

An actionable intent node, along with its linked concept nodes, may be described as a “domain.” In the present discussion, each domain is associated with a respective actionable intent, and refers to the group of nodes (and the relationships therebetween) associated with the particular actionable intent. For example, the ontology 360 shown in FIG. 3C includes an example of a restaurant reservation domain 362, an example of a reminder domain 364, and an example of a third party restaurant review domain 366 within the ontology 360. The restaurant reservation domain 362 includes the actionable intent node “restaurant reservation.” property nodes “restaurant,” “date/time,” and “party size,” and sub-property nodes “cuisine,” “price range,” “phone number,” and “location.” The reminder domain 364 includes the actionable intent node “set reminder,” and property nodes “subject” and “date/time.” The restaurant review domain 366 includes the actionable intent node “restaurant review,” property nodes “review.” “rating.” and “restaurant,” and sub-property nodes “cuisine.” “price range,” “phone number,” and “location.” In some embodiments, the ontology 360 is made up of many domains. Each domain may share one or more property nodes with one or more other domains. For example, the “date/time” property node may be associated with many other domains (e.g., a scheduling domain, a travel reservation domain, a movie ticket domain, etc.), in addition to the restaurant reservation domain 362 and the reminder domain 364.

While FIG. 3C illustrates two exemplary domains within the ontology 360, the ontology 360 may include other domains (or actionable intents), such as “initiate a phone call,” “find directions,” “schedule a meeting,” “send a message,” and “provide an answer to a question,” and so on. For example, a “send a message” domain is associated with a “send a message” actionable intent node, and may further include property nodes such as “recipient(s)”, “message type”, and “message body.” The property node “recipient” may be further defined, for example, by the sub-property nodes such as “recipient name” and “message address.”

In some embodiments, the ontology 360 includes all the domains (and hence actionable intents) that the digital assistant is capable of understanding and acting upon. In some embodiments, the ontology 360 may be modified, such as by adding or removing domains or nodes, or by modifying relationships between the nodes within the ontology 360.

In some embodiments, nodes associated with multiple related actionable intents may be clustered under a “super domain” in the ontology 360. For example, a “travel” super-domain may include a cluster of property nodes and actionable intent nodes related to travels. The actionable intent nodes related to travels may include “airline reservation,” “hotel reservation,” “car rental,” “get directions,” “find points of interest,” and so on. The actionable intent nodes under the same super domain (e.g., the “travels” super domain) may have many property nodes in common. For example, the actionable intent nodes for “airline reservation,” “hotel reservation,” “car rental,” “get directions,” “find points of interest” may share one or more of the property nodes “start location.” “destination,” “departure date/time,” “arrival date/time,” and “party size.”

In some embodiments, each node in the ontology 360 is associated with a set of words and/or phrases that are relevant to the property or actionable intent represented by the node. The respective set of words and/or phrases associated with each node is the so-called “vocabulary” associated with the node. The respective set of words and/or phrases associated with each node can be stored in the vocabulary index 344 (FIG. 3B) in association with the property or actionable intent represented by the node. For example, returning to FIG. 3B, the vocabulary associated with the node for the property of “restaurant” may include words such as “food,” “drinks,” “cuisine.” “hungry,” “cat,” “pizza,” “fast food,” “meal,” and so on. For another example, the vocabulary associated with the node for the actionable intent of “initiate a phone call” may include words and phrases such as “call,” “phone,” “dial,” “ring,” “call this number,” “make a call to,” and so on. The vocabulary index 344 optionally includes words and phrases in different languages.

In some embodiments, the natural language processor 332 shown in FIG. 3B receives the token sequence (e.g., a text string) from the speech-to-text processing module 330, and determines what nodes are implicated by the words in the token sequence. In some embodiments, if a word or phrase in the token sequence is found to be associated with one or more nodes in the ontology 360 (via the vocabulary index 344), the word or phrase will “trigger” or “activate” those nodes. When multiple nodes are “triggered,” based on the quantity and/or relative importance of the activated nodes, the natural language processor 332 will select one of the actionable intents as the task (or task type) that the user intended the digital assistant to perform. In some embodiments, the domain that has the most “triggered” nodes is selected. In some embodiments, the domain having the highest confidence value (e.g., based on the relative importance of its various triggered nodes) is selected. In some embodiments, the domain is selected based on a combination of the number and the importance of the triggered nodes. In some embodiments, additional factors are considered in selecting the node as well, such as whether the digital assistant system 300 has previously correctly interpreted a similar request from a user.

In some embodiments, the digital assistant system 300 also stores names of specific entities in the vocabulary index 344, so that when one of these names is detected in the user request, the natural language processor 332 will be able to recognize that the name refers to a specific instance of a property or sub-property in the ontology. In some embodiments, the names of specific entities are names of businesses, restaurants, people, movies, and the like. In some embodiments, the digital assistant system 300 can search and identify specific entity names from other data sources, such as the user's address book, a movies database, a musicians database, and/or a restaurant database. In some embodiments, when the natural language processor 332 identifies that a word in the token sequence is a name of a specific entity (such as a name in the user's address book), that word is given additional significance in selecting the actionable intent within the ontology for the user request.

For example, when the words “Mr. Santo” is recognized from the user request, and the last name “Santo” is found in the vocabulary index 344 as one of the contacts in the user's contact list, then it is likely that the user request corresponds to a “send a message” or “initiate a phone call” domain. For another example, when the words “ABC Café” are found in the user request, and the term “ABC Café.” is found in the vocabulary index 344 as the name of a particular restaurant in the user's city, then it is likely that the user request corresponds to a “restaurant reservation” domain.

User data 348 includes user-specific information, such as user-specific vocabulary, user preferences, user address, user's default and secondary languages, user's contact list, and other short-term or long-term information for each user. The natural language processor 332 can use the user-specific information to supplement the information contained in the user input to further define the user intent. For example, for a user request “invite my friends to my birthday party,” the natural language processor 332 is able to access user data 348 to determine who the “friends” are and when and where the “birthday party” would be held, rather than requiring the user to provide such information explicitly in his/her request.

Once the natural language processor 332 identifies an actionable intent (or domain) based on the user request, the natural language processor 332 generates a structured query to represent the identified actionable intent. In some embodiments, the structured query includes parameters for one or more nodes within the domain for the actionable intent, and at least some of the parameters are populated with the specific information and requirements specified in the user request. For example, the user may say “Make me a dinner reservation at a sushi place at 7.” In this case, the natural language processor 332 may be able to correctly identify the actionable intent to be “restaurant reservation” based on the user input. According to the ontology, a structured query for a “restaurant reservation” domain may include parameters such as {Cuisine}, {Time}, {Date}, {Party Size}, and the like. Based on the information contained in the user's utterance, the natural language processor 332 may generate a partial structured query for the restaurant reservation domain, where the partial structured query includes the parameters {Cuisine=“Sushi”} and {Time=“7 pm”}. However, in this example, the user's utterance contains insufficient information to complete the structured query associated with the domain. Therefore, other necessary parameters such as {Party Size} and {Date} are not specified in the structured query based on the information currently available. In some embodiments, the natural language processor 332 populates some parameters of the structured query with received context information. For example, if the user requested a sushi restaurant “near me,” the natural language processor 332 may populate a {location} parameter in the structured query with GPS coordinates from the user device 104.

In some embodiments, the natural language processor 332 passes the structured query (including any completed parameters) to the task flow processing module 336 (“task flow processor”). The task flow processor 336 is configured to perform one or more of: receiving the structured query from the natural language processor 332, completing the structured query, and performing the actions required to “complete” the user's ultimate request. In some embodiments, the various procedures necessary to complete these tasks are provided m task flow models 354. In some embodiments, the task flow models 354 include procedures for obtaining additional information from the user, and task flows for performing actions associated with the actionable intent.

In some embodiments, the digital assistant 326 includes a template processing module. In some embodiments, the token sequence generated by the speech-to-text processing module 330 is sent to the template processing module in addition to, or instead of, the natural language processing module 332. The template processing module has access to a plurality of predefined templates. A template typically defines a particular linguistic pattern. Exemplary templates include “play [x],” “play [x] on [y],” “buy [a] from [b],” and “forward [c] to [d].”

In some embodiments, the template processing module is directly coupled with external services. In some embodiments, the template processing module communicates with external services through the service processing module 338. In some embodiments, the service models 356, which include information identifying external services, are associated with a particular template. In some embodiments, a third party service provider sends a request to be associated with a particular template or a particular set of templates, and in response, the information in the service models 356 is updated to indicate that the third party service provider is associated with the particular template or the particular set of templates. In some embodiments, an application (e.g., an application installed on the device) includes information indicating that a corresponding third party service provider is associated with a particular template or a particular set of templates. In some embodiments, subsequent to installing an application, the digital assistant 326 updates the information to reflect that the corresponding third party service provider is associated with a particular template or a particular set of templates (e.g., for the device or its user).

In some embodiments, templates are grouped. For example, “play [x]” and “play [x] on [y]” can be grouped together as a set of music (and/or video) templates. In some embodiments, templates are grouped together based on contexts (e.g., location of the device). For example, a set of “in car” video templates includes video templates used while the device is in a car (e.g., templates for playing audio without video of a movie file, templates for controlling car stereo, etc.), and a set of “at home” video templates includes video templates used while the device is at home (e.g., templates for playing both video and audio data of a movie file, templates for controlling a home stereo system, etc.). In another example, a set of “moving” news templates includes news templates used while the device (or its user) is moving (e.g., templates for retrieving short stories, headlines, and/or text-only stories that are better suited for reviewing when the user is driving about town), and a set of “stationary” news templates includes news templates used while the device (or its user) is stationary (e.g., templates for retrieving long stories and/or graphics that are better suited for reviewing when the user has more time to review). In some embodiments, third party service providers are associated with one or more templates and not with some other templates. For example, new service provider XYZ may be associated with “moving” news templates, but not with “stationary” news templates, while new service provider JKL may be associated with both “moving” and “stationary” news templates.

In some embodiments, one or more templates are provided by one or more third party service providers. For example, a third party service provider sends a template to the digital assistant 326, and the digital assistant 326 integrates the received template with the plurality of predefined templates. This allows third party service providers to create templates with a new vocabulary (e.g., “tweet [x]”). In some embodiments, the received template also includes one or more synonyms for the new vocabulary.

In some embodiments, the digital assistant 326 determines that the received input corresponds to at least one predefined template and at least one third party provided template, and selects a predefined template. In other words, a predefined template has priority over a third-party provided template.

In some embodiments, the templates include templates in multiple languages. For example, the templates may include a first template in English, and a second template in Spanish. In some embodiments, the first template corresponds to the second template (e.g., both the first template and the second template are for a same action).

In some embodiments, the digital assistant 326 receives an input that corresponds to a predefined template, and in response, sends the input to a particular third party service provider. For example, in some embodiments, the input is “play [x] on [y]” and the digital assistant 326 sends the input (e.g., a speech data or a corresponding text) to a third party service provider that corresponds to [y].

In some embodiments, the digital assistant 326 receives an input that corresponds to a particular template while displaying a user interface of an application that corresponds to a particular third party service provider, determines that the particular template is associated with the particular third party service provider, and sends the input to the particular third party service provider. For example, the digital assistant receives an input “forward [x] to [y],” while displaying a messaging application (e.g., email or SMS application), and forwards the input to a third party service provider that corresponds to the displayed or open messaging application. In some embodiments, the digital assistant 326 determines that the particular template is not associated with the particular third party service provider, and disregards the input.

In some embodiments, the digital assistant 326 receives a user input while displaying a user interface of a particular application, and determines whether the input corresponds to one or more templates associated with the particular application. In accordance with a determination that the input corresponds to one or more templates associated with the particular application, the digital assistant 326 sends the input to the third party service provider associated with the particular application. For example, the digital assistant 326 receives a user input “play [x]” while displaying a user interface of a particular music player application, and sends the input to a third party service player associated with the particular music player application (even if multiple music service providers are associated with the same template).

In some embodiments, the digital assistant 326 receives a user input, and determines that the user input corresponds to a particular template that is associated with multiple third party service providers. The digital assistant 326 selects one of the multiple third party service providers associated with the particular template, and sends the user input to the selected third party service provider. In some embodiments, the selection of a third party service provider is based on a review of the multiple third party service providers. In some embodiments, the selection of a third party service provider is based on a priority ranking of the multiple third party service providers. In some embodiments, the priority ranking of the multiple third party service providers is based on an amount each third party service provider has agreed to pay to be listed on the priority ranking. For example, a third party service provider that makes a high bid is ranked higher than a third party service provider that makes a lower or no bid.

In some embodiments, the digital assistant 326 receives a user input, and determines that the user input corresponds to a particular template that is associated with multiple third party service providers. The digital assistant 326 sends the user input to two or more third party service providers, and receives an acknowledgement indicating whether a respective third party service provider is available. In some embodiments, the digital assistant 326 determines that only one third party service provider is available and select the available third party service provider. In some embodiments, the digital assistant 326 determines that a particular service provider has provided the acknowledgement faster than the remainder of the multiple third party service providers, and selects the particular service provider.

In some embodiments, template selection rules are published so that all third party service providers may know the template selection rules.

In some embodiments, the third party service provider includes a third party digital assistant. The third party digital assistant is similar to the digital assistant 326 described herein. In some embodiments, the third party digital assistant includes an ontology (similar to the ontology 360), third party vocabulary (similar to vocabulary 344), third party user data (similar to user data 348), and one or more third party task flow models (similar to task flow models 354). The third party service provider receives the input and processes the received input with the third party digital assistant in a manner similar to the operations of the digital assistant 326 described herein. The third party service provider provides results to the digital assistant 326, and the digital assistant 326 causes the results to be presented to the user (e.g., in a dialogue user interface for the digital assistant 326 or as a voice output). In some embodiments, the results from the third party digital assistant are output using a voice different from a voice used for outputting results not from the third party digital assistant.

In some embodiments, the digital assistant 326 receives a request to disambiguate an input from a third party service provider. For example, the digital assistant 326 sends a user input “play Rock and Roll” to a music service provider, and the music service provider sends a request back to the digital assistant 326 to disambiguate to the digital assistant 326. In this case, the request may include a request to disambiguate whether to play a radio station with rock and roll music or to play a song entitled “Rock and Roll.”

As described above, in order to complete a structured query, the task flow processor 336 may need to initiate additional dialogue with the user in order to obtain additional information, and/or disambiguate potentially ambiguous utterances. When such interactions are necessary, the task flow processor 336 invokes the dialogue flow processing module 334 to engage in a dialogue with the user. In some embodiments, the dialogue flow processing module 334 determines how (and/or when) to ask the user for the additional information, and receives and processes the user responses. In some embodiments, the questions are provided to and answers are received from the users through the I/O processing module 32 g. For example, the dialogue flow processing module 334 presents dialogue output to the user via audio and/or visual output, and receives input from the user via spoken or physical (e.g., touch gesture) responses. Continuing with the example above, when the task flow processor 336 invokes the dialogue flow processing module 334 to determine the “party size” and “date” information for the structured query associated with the domain “restaurant reservation,” the dialogue flow processing module 334 generates questions such as “For how many people?” and “On which day?” to pass to the user. Once answers are received from the user, the dialogue flow processing module 334 populates the structured query with the missing information, or passes the information to the task flow processor 336 to complete the missing information from the structured query.

In some cases, the task flow processor 336 may receive a structured query that has one or more ambiguous properties. For example, a structured query for the “send a message” domain may indicate that the intended recipient is “Bob,” and the user may have multiple contacts named “Bob.” The task flow processor 336 will request that the dialogue flow processing module 334 disambiguate this property of the structured query. In turn, the dialogue flow processing module 334 may ask the user “Which Bob?”, and display (or read) a list of contacts named “Bob” from which the user may choose.

Once the task flow processor 336 has completed the structured query for an actionable intent, the task flow processor 336 proceeds to perform the ultimate task associated with the actionable intent. Accordingly, the task flow processor 336 executes the steps and instructions in the task flow model according to the specific parameters contained in the structured query. For example, the task flow model for the actionable intent of “restaurant reservation” may include steps and instructions for contacting a restaurant and actually requesting a reservation for a particular party size at a particular time. For example, using a structured query such as: {restaurant reservation, restaurant=ABC Café, date=Mar. 12, 2012, time=7 pm, party size=5}, the task flow processor 336 may perform the steps of: (1) logging onto a server of the ABC Café or a restaurant reservation system that is configured to accept reservations for multiple restaurants, such as the ABC Café, (2) entering the date, time, and party size information in a form on the website, (3) submitting the form, and (4) making a calendar entry for the reservation in the user's calendar.

In some embodiments, the task flow processor 336 employs the assistance of a service processing module 338 (“service processor”) to complete a task requested in the user input or to provide an informational answer requested in the user input. For example, the service processor 338 can act on behalf of the task flow processor 336 to make a phone call, set a calendar entry, invoke a map search, invoke or interact with other user applications installed on the user device, and invoke or interact with third party services (e.g. a restaurant reservation portal, a social networking website, a banking portal, etc.). In some embodiments, the protocols and application programming interfaces (API) required by each service can be specified by a respective service model among the services models 356. The service processor 338 accesses the appropriate service model for a service and generates requests for the service in accordance with the protocols and APIs required by the service according to the service model.

For example, if a restaurant has enabled an online reservation service, the restaurant can submit a service model specifying the necessary parameters for making a reservation and the APIs for communicating the values of the necessary parameter to the online reservation service. When requested by the task flow processor 336, the service processor 338 can establish a network connection with the online reservation service using the web address stored in the service models 356, and send the necessary parameters of the reservation (e.g., time, date, party size) to the online reservation interface in a format according to the API of the online reservation service.

As explained above, in some embodiments, the one or more default domains 372 include one or more private domains. In some embodiments, the one or more private domains include a domain that corresponds to a task that does not require an external service (e.g., external service 120 in FIG. 1 ). In some embodiments, the one or more private domains include a domain that corresponds to a default service provider (e.g., a private domain corresponds to a task that requires an external service from the default service provider). For example, a private domain may include a calendar service domain that is used for storing and/or retrieving a calendar event, and the calendar service domain corresponds to a task that requires calendar event storing and/or retrieving services from a default calendar service provider. In some embodiments, a private domain is owned by a developer of the device or the digital assistant 326 (e.g., APPLE Inc.). Thus, user interfaces and content are both under control of the developer of the device or the digital assistant 326.

As explained above, in some embodiments, the one or more third party domains 374 include one or more public domains. In some embodiments, the one or more public domains are developed by a developer of the device or the digital assistant 326, whereas content is provided from a third party.

In some embodiments, the one or more third party domains 374 include one or more developer domains. In some embodiments, both a public domain and a developer domain correspond to tasks that require an external service from one or more third party service providers. As used herein, a third party service provider is a service provider other than a default service provider. In some embodiments, a public domain is not developed by a third party service provider (e.g., a public domain developed by a manufacturer of the device based on information available from a third party service provider). In some embodiments, a developer domain is developed by a third party service provider. In some embodiments, a developer domain corresponds to a task flow model 354 developed by a third party service provider and/or a dialogue flow model developed by a third party service provider for processing by the dialogue flow processing module 334 (FIG. 3B). In some embodiments, the developer domain is stored at a server of a third party service provider (e.g., external services 120).

In some embodiments, the natural language processor 332, dialogue flow processing module 334, and task flow processor 336 are used collectively and iteratively to deduce and define the user's intent, obtain information to further clarify and refine the user intent, and finally generate a response (e.g., provide an output to the user, or complete a task) to fulfill the user's intent.

In some embodiments, after all of the tasks needed to fulfill the user's request have been performed, the digital assistant 326 formulates a confirmation response, and sends the response back to the user through the I/O processing module 328. If the user request seeks an informational answer, the confirmation response presents the requested information to the user. In some embodiments, the digital assistant also requests the user to indicate whether the user is satisfied with the response produced by the digital assistant 326.

FIGS. 4A-4B are flow diagrams illustrating exemplary operations undertaken by a DA server, a DA client, and a service provider (e.g., the server system 108, the user device 104 a, and a messaging service 122-2 in FIG. 1 ). These operations are merely exemplary and fewer or less other interactions may be performed by the DA server, the DA client, and service provider(s) in various embodiments.

In some embodiments, the service provider (e.g., Service Provider 1 (120-1)) sends (402) one or more task types (e.g., “make a restaurant reservation” and/or “find a match score”) to the DA server. In some embodiments, the one or more task types identify one or more task types supported by the service provider. In some embodiments, the service provider sends a vocabulary or an identification of a vocabulary. In some embodiments, the service provider sends domain information (e.g., a data model as illustrated in FIG. 3C) regarding at least one of the one or more task types. In some embodiments, the service provider sends two or more of: the one or more task types, the vocabulary or the identification of the vocabulary, and the domain information.

Typically, a third party service provider and the digital assistant system 300 are not owned by a same person or entity. For example, the digital assistant system 300 is owned by Applicant. APPLE Inc., while the third party service provider is a server owned by a restaurant reservation service provider (e.g., OPENTABLE. Inc.).

In some embodiments, the DA server receives (404) and integrates (406) the one or more task types into the task flow models 354 (e.g., as one or more third party task flow models in the third party task flow models 382). As described above with reference to FIG. 3A, in some embodiments, the task flow models 354 include the third party task flow models 382 and the default task flow models 380, which are not received from a third party service provider. In some embodiments, the task flow models 354 already include existing third party task flow models, and the DA server stores the received one or more task types with the existing third party task flow models. In some embodiments, the DA server performs a task corresponding to a task flow model in the third party task flow models 382. For example, when the digital assistant system 300 (FIG. 3A) is configured to support making restaurant reservations by default (i.e., not using task flow models provided by third party service provider systems), the default task flow models 380 include task flow models for making restaurant reservations. Continuing with the example, when the digital assistant system 300 is configured to provide sports scores based on third party domains 374, the third party task flow models 382 include a flow model for retrieving sports scores (e.g., retrieving sports scores from the Service Provider 1),

In some embodiments, the DA server receives and integrates the vocabulary or the identification of the vocabulary into the vocabulary 344 (e.g., the third party vocabulary 378). As described above with reference to FIG. 3A, in some embodiments, the vocabulary 344 includes the third party vocabulary 378 (or a third party vocabulary index) and the default vocabulary 376 (or a default vocabulary index), which is not received from a third party service provider. For example, in some embodiments, when the digital assistant system 300 (FIG. 3A) is configured to support making restaurant reservations by default (i.e., not using ontology data or vocabulary provided by third party service provider systems), the one or more default vocabulary indices 376 include terms related to making restaurant reservations, such as “restaurant,” “reservation,” and “party size.” In some embodiments, each of these terms is separately affiliated with a list of synonyms. In some embodiments, the default vocabulary 376 also includes restaurant names and/or restaurant locations (e.g., street names). In comparison, the one or more third party vocabulary indices 378, when the digital assistant system 300 is configured to provide sports scores based on third party domains 374, include terms related to sports, such as types of sports (e.g., baseball, basketball, football, soccer, etc.), names of players and teams, and locations of sports events.

Similarly, in some embodiments, the DA server receives and integrates the domain information into the ontology 360 (e.g., the third party domain 374). As described above with reference to FIG. 3A, in some embodiments, the ontology 360 includes the third party domain 374 and the default domains 370 (e.g., the restaurant reservation domain 362 and the reminder domain 364. FIG. 3C), which are not received from a third party service provider. Typically, the one or more third party domains 374 correspond to one or more task types that do not correspond to the default domains 372. For example, in some embodiments, the default domains 372 do not correspond to retrieving sports scores, but one or more third party domains 374 include a “sports scores” domain for addressing sports score queries from users.

In some embodiments, in response to receiving the one or more task types and/or the domain information, the DA server updates the service provider directory 390 and/or the supported tasks 392. The service provider directory 390 typically includes a list of third party service providers that the DA server has access to. The supported tasks 392 typically include a list of task types supported by respective third party service providers and/or a list of third party service providers that support respective task types. For example, the DA server adds the Service Provider 1 to the service provider directory 390 and lists task types supported by the Service Provider 1 in the supported tasks 392 in connection with the Service Provider 1.

In some embodiments, at least one of the one or more third party domains 374 (or information for the one or more third party domains 374) is provided that is location specific. For example, in some embodiments, when the DA client 104 approaches or enters a particular hotel, the hotel's service provider system automatically provides a domain relevant to that hotel to the digital assistant system 300. In some embodiments, the digital assistant system 300 automatically receives the domain relevant to that hotel. In other embodiments, the digital assistant system 300 asks the user whether the user wants to receive the local domain (e.g., the domain relevant to that hotel). In some embodiments, the at least one domain provided by the hotel's service provider system includes tasks or task types related to that particular hotel (e.g., finding room rates, locating restaurant facilities in the hotel, etc.).

In some embodiments, the DA client 104 generates a voice output with a voice having a first set of voice characteristics for tasks associated with default domains 372 and generates a voice output with a voice having a second set of voice characteristics for tasks associated with third party domains 374. For example, the DA client 104 may generate a voice output with a certain female voice for tasks associated with the default domains 372, and generate a voice output with a certain male voice for tasks associated with a third party domain 374. Voice characteristics may include one or more of pitch, speed, and volume, and/or characteristics typical to a particular group of speakers classified based on, for example, gender (e.g., male or female), age (e.g., adult or child), and accents. In some embodiments, respective third party domains are associated with respective voices having respective sets of voice characteristics. For example, a first third party domain may be associated with a voice having a third set of voice characteristics and a second third party domain may be associated with a voice having a fourth set of voice characteristics. For example, a high-end hotel chain may have a domain associated with a refined accent.

In some embodiments, when the DA client 104 moves away from a predefined location, the DA client automatically removes one or more domains associated with the predefined location. For example, when the DA client 104 moves away from the hotel, the DA client automatically removes one or more domains provided by the hotel's service provider system. In some other embodiments, the DA client retains a predefined number of recently used third party domains (e.g., before receiving a new third party domain, the DA client removes a third pally domain stored in the DA client that was used last, also known as the first-in-first-out (FIFO)). In some embodiments, the DA client removes a third party domain based on a frequency of use (e.g., removes a domain that is least frequently used) instead of the time of last use. In yet other embodiments, the DA server asks the DA client whether it wants to remove the one or more domains provided by the hotel's server provider system. In some embodiments, a list of the one or more third party domains 374 available to the DA client is stored in the DA server, and based on the response from the DA client, the DA server removes one or more third party domains from the list. In other embodiments, the list of the one or more third party domains 374 available to the DA client is stored on the DA client, and the DA client removes one or more third party domains from the list.

While these operations (e.g., the operations 402, 404, and 406) are typically performed before a user provides an input (i.e., prior to receiving an input from a user) that would initiate the particular task, these may also be performed in real time after a user provides input.

In some embodiments, another service provider (e.g., Service Provider 2 (120-2)) also sends task types supported by that service provider to the DA server, and the DA server integrates these into the task flow models 354 and/or the service provider directory 390, as described above. However, until the server 108 identifies a task type corresponding to that service provider, the server 108 typically does not send a request to that service provider.

At anytime thereafter, the DA client receives (408) an input (e.g., a voice input) from the user. In some embodiments, the DA client receives the input through one or more microphones. For example, the DA client may receive a voice command of the user, such as “book a restaurant at 7 pm.” In some embodiments, the DA client receives the input through a touch-sensitive surface. The DA client sends (410) the input from the user to the DA server, and may also send contextual information, such as the location of the DA client.

The DA server receives (412) the input of the user, and identifies (414) a respective task type as described below in reference to FIG. 4B. In some embodiments, when the input of the user is a voice command, the DA server receives the input as an audio file (or as a string of text corresponding to the speech if the DA client includes a text-to-speech engine). As described above with reference to FIG. 3B, in some embodiments, the DA server uses the digital assistant 326 (FIG. 3B) to identify the respective task type. For example, the DA server may determine from the input of the user that the user wants to make a restaurant reservation (i.e., identify “making a restaurant reservation” as a requested task type). For example, when the user input is “book a restaurant tonight,” the identified task type is a restaurant reservation that corresponds to at least one restaurant reservation service provider, and when the user input is “what is the latest Giants' score,” the identified task type is retrieving sports scores.

In some embodiments, the device identifies the respective task type in accordance with a vocabulary (or an identification of a vocabulary, such as associating an existing vocabulary with a new task or domain) received from the third party service provider. For example, after receiving an inquiry from the user, “where is Jeremy Lin playing today,” the device may determine that the term, Jeremy Lin, matches an entry in a third party vocabulary index from a sports game schedule service provider as an athlete's name, and identify that retrieving a location of a sports game is the requested task. Similarly, after receiving an inquiry from the user, “where is the Hunger Games playing today,” the device may determine that the term, the Hunger Games, matches an entry in a third party vocabulary index from a movie schedule/ticketing service provider as a movie title, and identify that retrieving a location of the movie screening is the requested task.

In some embodiments, the DA server locates (416) one or more service providers that can perform the identified task type. In some embodiments, the DA server locates the one or more service providers that can perform the identified task type in accordance with information in the service provider directory 390 and/or the list of supported tasks or competencies 392. By using competencies, the DA server can more efficiently identify service providers that are suitable for an identified task type. For example, two restaurant reservation service providers (e.g., a first restaurant reservation service provider and a second restaurant reservation service provider) may have one or more supported task types including making restaurant reservations, indicating that the two restaurant reservation service providers can provide restaurant reservation services. In another example, one or more supported task types associated with a particular service provider may include “sports schedules,” indicating that the particular service provider can provide information about sports game schedules.

In some embodiments, when the DA server locates two or more service providers that can perform the identified task type, the DA server selects one of the two or more service providers. In some other embodiments, the DA server selects multiple service providers of the two or more service providers. In some embodiments, the DA server sends (418) a request to the one or more selected service providers, typically one service provider, to perform a task of the identified task type. Alternatively, in other embodiments, the DA server sends the request to the DA client 104, and the DA client receives the request and sends (419) the request to the one or more selected service providers. In some embodiments, the respective service provider is configured to complete the task. In some other embodiments, the task requires multiple service providers. For example, the task may be “buy tickets for a most popular movie starring actor X.” Performing this task may require receiving information from, or performing a task with, a movie ranking service provider, a movie database service provider, and a movie ticket purchase service provider. In other words, each service provider performs a portion of the task, and the device integrates information from multiple selected service providers.

In some embodiments, the DA server locates one or more default service providers that correspond to private domains and one or more third party service providers, both the one or more default service providers and the one or more third party service providers capable of performing the identified task type, and selects one or more default service providers.

The service provider then receives (420) the request, performs (422) the requested task, and sends (424) one or more results relating to the performance of the requested task to the DA server 108.

The DA server 108 receives (426) the one or more results from the service provider, and sends (428) one or more of the one or more results to the DA client 104.

Alternatively, the service provider sends the one or more results directly back to the client 104 (shown by broken arrow between 424 and 429).

The DA client 104 receives (429) the one or more results, and presents (430) the one or more received results to the user (e.g., as an audio output or a visual display). In some embodiments, the DA client 104 presents (432) at least a portion of the one or more received results to the user through a user interface of a software application (e.g., 270-1 or 270-2, FIG. 2 ) other than the digital assistant client module 264. In some embodiments, the DA client 104 presents (434) at least a portion of the one or more received results to the user not through a user interface of a software application other than the digital assistant client module 264 (e.g., through a user interface of the digital assistant client module 264 or through an audio interface not associated with any particular software application). In some embodiments, the DA client 104 outputs speech of the one or more received results.

FIG. 4B is a flow diagram providing additional details of certain operations illustrated in FIG. 4A.

In some embodiments, identifying (414) a respective task type includes determining whether the user is authorized to use services of one or more third party service providers. In some embodiments, the user is deemed to be authorized for a particular third party service provider when the user is authorized to use a software application associated with the particular third party service provider. For example, if the user has bought an application for a particular service provider (e.g., a restaurant rating service provider), then the user is deemed to be authorized to use services of the particular service provider (and corresponding third party domains 374). If the user is authorized for the one or more third party service providers, the DA server searches the domains (e.g., one or more third party domains 374) in the ontology 360. Once the DA server identifies a relevant domain, the DA server uses an appropriate task flow model associated with the relevant domain (and corresponding to the one or more authorized third party service providers).

In some embodiments, the DA server identifies one or more private domains (e.g., default domains 372) and one or more third party domains (e.g., third party domains 374) and uses an appropriate task flow model associated with a private domain. In other words, in some embodiments, the DA server selects a private domain over a third party domain when both the private domain and the third party domain correspond to the input.

In some embodiments, if the user is not authorized for the one or more third party service providers, or if no authorized third party domain corresponds to the input of the user, the DA server determines whether to search default domains. For example, the DA server determines whether the default domains include a domain that corresponds to the input of the user. If the DA server determines to search the default domains (e.g., the DA server determines that the default domains include a domain that corresponds to the input of the user), the DA server searches the default domains to identify a respective default task flow model that corresponds to the input of the user, and processes the respective default task flow model.

In some embodiments, if the DA server determines not to search the default domains, or if no default domain corresponds to the input of the user, the DA server may perform other actions, such as searching a search engine or a knowledge engine or disregarding the input.

In some embodiments, if the DA server determines not to punt the input of the user, the DA server disregards the input.

In some embodiments, the DA server 108 communicates with the DA client 104. In some embodiments, the DA client 104 stores in the memory 250 one or more software applications 270-1 and 270-2 that corresponds to third party service providers (e.g., ZAGAT software application and YELP application that correspond to different restaurant review providers). As explained above, in some embodiments, the DA server includes the user application data 340.

In some embodiments, the DA server 340 selects a service provider based on one or more software applications that the user is authorized to use, as explained in detail below. In some embodiments, locating (416) the one or more service providers includes locating a third party service provider for which a corresponding application is stored in the DA client (FIG. 1 ). For example, the digital assistant system 300 may have access to a plurality of restaurant review providers. This is based on an assumption that the user of the DA client 104 is interested in receiving information from the third party service provider, because the user of the DA client 104 chose to store (e.g., install) the corresponding application on the DA client 104. In some embodiments, when the DA client 104 is authorized to use the ZAGAT software application but not the MICHELIN GUIDE application, the DA server selects ZAGAT as a restaurant review provider, and sends a request for restaurant reviews to a ZAGAT server. One reasoning is that the user of the DA client 104 is assumed to have a preference for the ZAGAT restaurant reviews, because the user is authorized to use the ZAGAT software application, but not the MICHELIN GUIDE application.

Although the above example describes the DA client 104 having the software application corresponding to the service provider system, in some embodiments, the DA client 104 need not store the software application corresponding to the service provider system. For example, the user may have purchased the software application, but have not yet downloaded or installed the software application on the DA client 104, or the user may have installed the software application on another DA client owned by the user. Alternatively, the user may have an existing account (e.g., a subscription or a license) with the service provider system. In some embodiments, the user application data 340 identifies one or more software applications the user is authorized to use. In some embodiments, the user application data 340 also identifies one or more service providers that correspond to the one or more software applications the user is authorized to use (e.g., websites or company names associated with the one or more software applications). In some embodiments, the user application data 340 identifies one or more service providers that the user is authorized to use other than default service providers (e.g., service providers all users of the digital assistant system 300 are authorized to use).

In some embodiments, the digital assistant system 300 has access to two or more service provider systems that support a same task type. For example, the two or more service provider systems may be configured to perform tasks of the same task type (e.g., both ZAGAT and YELP for providing restaurant reviews).

In some embodiments, locating (416) the one or more service providers includes locating a service provider that corresponds to a software application that the user has purchased (e.g., ZAGAT over YELP). In some embodiments, locating (416) the one or more service providers includes locating a third party service provider that corresponds to a most recently used application. In some embodiments, locating (416) the one or more service providers includes locating a third party service provider that corresponds to a most frequently used application.

In some embodiments, locating (416) the one or more service providers include multiple service providers. For example, the DA server may select ZAGAT and YELP out of three restaurant review providers. ZAGAT, YELP, and MICHELIN GUIDE, and combine results provided by both ZAGAT and YELP. Alternatively, the DA server may ask the user to choose a preference between ZAGAT and YELP. In some embodiments, the DA server stores the user preference (e.g., in the user data 348). For example, the user may choose to allow certain service providers to provide results to the user. Additionally, or alternatively, the user may choose to block some other service providers from providing results to the user. In some embodiments, the user selects a number of times a particular provider is permitted to provide results (e.g., once per day). In some embodiments, the user selects a number of results a particular provider is permitted to provide in response to each input.

In some embodiments, locating (416) the one or more service providers includes selecting one or more service providers based on an identity of the user. For example, when two news service providers (“XYZ News” and “XYZ Kids”) are located, a news service provider is selected based on the identity of the user (e.g., if the user is an adult, select “XYZ News” that is designed for adults, and if the user is a child, select “XYZ Kids” that is designed for children). In some embodiments, the identity of the user is determined from a user profile stored in the device. In some embodiments, the identity of the user is determined from one or more recently used applications, time of day, types of inputs, etc.

In some embodiments, sending (418) a request to perform a task includes sending the request to one or more selected service providers. In turn, the DA server receives (426) the one or more results from one or more of the one or more selected service providers. For example, in some embodiments, the DA server sends the request to multiple service providers (e.g., multiple airlines for ticket pricing) and receives results from a subset of the multiple service providers (e.g., during a predefined time period). This allows the DA server to utilize results provided by those service providers that respond quickly, and avoid unacceptable delays, in waiting for the results, that degrade the user experience.

Then, the DA server sends (428) one or more of the one or more results to the DA client 104 for presentation (e.g., visual or audio) to the user. The DA client 104 receives the one or more results sent by the DA server, and presents (430) at least a portion of the one or more results to the user.

In some embodiments, sending (418) the request includes sending to a third party software application stored in the DA client an instruction to send the request to one or more service providers (e.g., including one or more third party service providers). In turn, the DA client, in response to receiving the instruction from the DA server, sends the request to one or more service providers. Then, the DA client receives one or more results from one or more of the one or more service providers, and presents (430) at least a portion of the one or more results to the client.

In some embodiments, the DA client presents the results through the third party software application stored in the DA client (e.g., the results are displayed in the user interface oldie third party software application). For example, the results from the ZAGAT service provider are presented on the user interface of the ZAGAT application stored on the DA client. In some embodiments, the DA client presents the results not through the third party software application (e.g., the results are displayed in the user interface of the digital assistant client module 264, FIG. 2 ). For example, the results from the ZAGAT service provider are presented on the user interface of the digital assistant client module 264.

The foregoing description, for purpose of explanation, has been described with reference to specific embodiments. However, the illustrative discussions above are not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations are possible in view of the above teachings. The embodiments were chosen and described in order to best explain the principles of the invention and its practical applications, to thereby enable others skilled in the art to best utilize the invention and various embodiments with various modifications as are suited to the particular use contemplated. 

1. (canceled)
 2. A non-transitory computer-readable storage medium storing one or more programs configured to be executed by one or more processors of an electronic device, the one or more programs including instructions for: receiving, from a third party service provider, a first request corresponding to one or more task types; associating, based on the first request, the third party service provider with a template associated with the one or more task types; receiving an input of a user; identifying, based on the received user input, the template associated with the third party service provider from a plurality of templates; in response to identifying the template associated with the third party service provider: determining, using the template, an intent including a task; and sending a second request to perform at least a portion of the task to the third party service provider.
 3. The non-transitory computer-readable storage medium of claim 2, wherein the electronic device is a server.
 4. The non-transitory computer-readable storage medium of claim 2, wherein the first request includes a vocabulary defined by the third party service provider.
 5. The non-transitory computer-readable storage medium of claim 2, wherein the first request includes a pre-existing task type.
 6. The non-transitory computer-readable storage medium of claim 2, wherein the first request includes a new task type.
 7. The non-transitory computer-readable storage medium of claim 2, wherein the template is further identified based on user-specific data.
 8. The non-transitory computer-readable storage medium of claim 2, wherein the template is further identified based on a state of a user device in communication with the electronic device.
 9. The non-transitory computer-readable storage medium of claim 2, wherein the template is further identified based on prior interaction between the user and a user device in communication with the electronic device.
 10. The non-transitory computer-readable storage medium of claim 2, wherein the template is further identified based on an authorization state associated with the user.
 11. The non-transitory computer-readable storage medium of claim 2, wherein the template is further identified based on a ranking associated with the template.
 12. The non-transitory computer-readable storage medium of claim 2, wherein determining, using the template, an intent including a task further comprises determining a parameter of the template.
 13. The non-transitory computer-readable storage medium of claim 12, wherein the parameter of the template is based on user-specific data.
 14. The non-transitory computer-readable storage medium of claim 12, wherein the parameter of the template is based on prior interaction between the user and a user device.
 15. The non-transitory computer-readable storage medium of claim 12, wherein the parameter of the template is based on an active application of the user device.
 16. The non-transitory computer-readable storage medium of claim 2, wherein the one or more programs further include instructions for: receiving a result of performing at least the portion of the task from the third party service provider; and providing the result to a user device.
 17. The non-transitory computer-readable storage medium of claim 16, wherein the one or more programs further include instructions for: causing the user device to provide an audio output including the result.
 18. The non-transitory computer-readable storage medium of claim 2, wherein the input of the user is an audio input received at a user device.
 19. The non-transitory computer-readable storage medium of claim 2, wherein the input of the user is text derived from an audio input received at a user device.
 20. An electronic device comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for: receiving, from a third party service provider, a first request corresponding to one or more task types; associating, based on the first request, the third party service provider with a template associated with the one or more task types; receiving an input of a user; identifying, based on the received user input, the template associated with the third party service provider from a plurality of templates; in response to identifying the template associated with the third party service provider: determining, using the template, an intent including a task; and sending a second request to perform at least a portion of the task to the third party service provider.
 21. A method of processing a user input, performed at an electronic device with one or more processors and memory, the method comprising: at the electronic device: receiving, from a third party service provider, a first request corresponding to one or more task types; associating, based on the first request, the third party service provider with a template associated with the one or more task types; receiving an input of a user; identifying, based on the received user input, the template associated with the third party service provider from a plurality of templates; in response to identifying the template associated with the third party service provider: determining, using the template, an intent including a task; and sending a second request to perform at least a portion of the task to the third party service provider. 